package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Friend;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FriendMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Friend record);

    Friend selectByPrimaryKey(Long id);

    List<Friend> selectAll();

    int updateByPrimaryKey(Friend record);

    Friend isFriend(@Param("userId") Long userId, @Param("friendId") Long friendId);

    void deleteByUserIdAndFriendId(@Param("userId") Long userId, @Param("friendId") Long friendId);

    //粉丝数
    Integer selectFans(Long id);
    //关注数
    Integer selectFriends(Long id);
}